﻿#pragma once

#include "ui/controls.h"
#include "sound.h"
#include "draw.h"

using namespace anip;

class ShadowPanel : public ui::Panel
{
public:
    ShadowPanel(Container* parent, vec2 pos, vec2 size);

    bcolor shadowColor = color{ 0.5f, 0.5f, 0.5f, 0.5f };
    bfloat shadowSize = 25;
    bvec2 shadowOffset = vec2{ 10, 10 };

    void paint() override;
};

class Interface : public ui::Window
{
protected:
    void processKey(Key k, ButtonAction action) override;
    void processParentResize() override;
    void processScroll(invec2 pos) override 
    {
        Control::processScroll(pos);
    } // disallow

private:
    int selectedGroup = 0;
    ShadowPanel* main = nullptr;
    ShadowPanel& createGroupUI(SoundGroup& s, int i);
    void createSoundUI(Sound& s, Container& parent);

public:
    Interface();

    using Window::mainLoop;
};
